/*            Copyright(c) 2006-2008 Dave Sexton           *
 * http://www.codeplex.com/DocProject                      *
 * http://www.codeplex.com/DocProject/Project/License.aspx *
 ***********************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;

namespace DaveSexton.DocProject.Sandcastle.TopicManagement
{
	public interface ITopicFilterEditor
	{
		/// <summary>
		/// When implemented, gets the editor's title for hosts such as a dialog or tab page.
		/// </summary>
		string Title { get; }

		/// <summary>
		/// When implemented, gets whether the editor can return a <see cref="Filter"/> that may be applied to a set of topics.
		/// </summary>
		bool CanApply { get; }

		/// <summary>
		/// When implemented, gets whether the editor can return a <see cref="Filter"/> that may be saved to a dynamic filters list.
		/// </summary>
		bool CanSave { get; }

		/// <summary>
		/// When implemented, gets the last filter bound with the <see cref="BindFilter"/> method or, if one doesn't exist, creates a new filter from the current settings each time the property is read.
		/// </summary>
		ITopicFilter Filter { get; }

		/// <summary>
		/// When implemented, loads the settings from the specified <paramref name="filter"/>.
		/// </summary>
		void LoadFilter(ITopicFilter filter);

		/// <summary>
		/// When implemented, binds the editor to the specified <paramref name="filter"/>.
		/// </summary>
		void BindFilter(ITopicFilter filter);

		event EventHandler<TopicFilterEditorTypeEventArgs> CanApplyChanged;
		event EventHandler<TopicFilterEditorTypeEventArgs> CanSaveChanged;
	}
}
